Skip to content

fix: DTOSS-9703 update diagnostic settings module (no breaking change) - pt1#222

Merged
MacMur85 merged 1 commit intomainfrom
fix/DTOSS-9703-update-diagnostic-settings-module-pt1
Aug 29, 2025
Merged

fix: DTOSS-9703 update diagnostic settings module (no breaking change) - pt1#222
MacMur85 merged 1 commit intomainfrom
fix/DTOSS-9703-update-diagnostic-settings-module-pt1

Conversation

@MacMur85
Copy link
Copy Markdown
Contributor

@MacMur85 MacMur85 commented Aug 28, 2025

Description

A change to the implementation of the Diagnostic Setting module required to eliminate the deprecated form of metric definition.

Old implementation:

module "diagnostic-settings" {
  source = "../diagnostic-settings"

  name                       = "${var.name}-diagnostic-setting"
  target_resource_id         = azurerm_api_management.apim.id
  log_analytics_workspace_id = var.log_analytics_workspace_id
  enabled_log                = var.monitor_diagnostic_setting_apim_enabled_logs
  metric                     = var.monitor_diagnostic_setting_apim_metrics
  metric_enabled             = var.metric_enabled
}

New implementation:

module "diagnostic-settings" {

  source = "../diagnostic-settings"

  name                       = "${var.name}-diagnostic-setting"
  target_resource_id         = azurerm_api_management.apim.id
  log_analytics_workspace_id = var.log_analytics_workspace_id
  enabled_log                = var.monitor_diagnostic_setting_apim_enabled_logs
  enabled_metric             = var.monitor_diagnostic_setting_apim_metrics
}

Context

This change DOES NOT require any modifications to the repositories using this module.
An example of Terraform plan using this branch without any changes to the cohort-manager repository:
https://dev.azure.com/nhse-dtos/dtos-cohort-manager/_build/results?buildId=26354&view=logs&j=a4711ba9-1de6-5fac-948e-3412ef3192b2&t=cf43d50a-9a4b-5a3b-80a0-425db2b5b168

The removal of the redundant enabled variable (a breaking change) will be implemented in a separate PR.

Type of changes

  • Refactoring (non-breaking change)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would change existing functionality)
  • Bug fix (non-breaking change which fixes an issue)

Checklist

  • I am familiar with the contributing guidelines
  • I have followed the code style of the project
  • I have added tests to cover my changes
  • I have updated the documentation accordingly
  • This PR is a result of pair or mob programming

Sensitive Information Declaration

To ensure the utmost confidentiality and protect your and others privacy, we kindly ask you to NOT including PII (Personal Identifiable Information) / PID (Personal Identifiable Data) or any other sensitive data in this PR (Pull Request) and the codebase changes. We will remove any PR that do contain any sensitive information. We really appreciate your cooperation in this matter.

  • I confirm that neither PII/PID nor sensitive data are included in this PR and the codebase changes.

@MacMur85 MacMur85 changed the title fix: a change to the module definition (no breaking change) fix: DTOSS-9703 update diagnostic settings module (no breaking change) - pt1 Aug 28, 2025
@MacMur85 MacMur85 force-pushed the fix/DTOSS-9703-update-diagnostic-settings-module-pt1 branch from c45fe7d to 00136fb Compare August 28, 2025 14:05
@MacMur85 MacMur85 force-pushed the fix/DTOSS-9703-update-diagnostic-settings-module-pt1 branch from 00136fb to 361fb1a Compare August 29, 2025 08:24
@MacMur85 MacMur85 added this pull request to the merge queue Aug 29, 2025
Merged via the queue into main with commit 143bb43 Aug 29, 2025
13 checks passed
@MacMur85 MacMur85 deleted the fix/DTOSS-9703-update-diagnostic-settings-module-pt1 branch August 29, 2025 08:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants